package com.watson.onebox.bean;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.env.Environment;
import org.springframework.core.type.AnnotatedTypeMetadata;
import org.springframework.stereotype.Component;

/**
 * @program: mytest
 * @description:
 * @author: zhangpeng348@jd.com
 * @date: 2019-07-23 21:29
 **/
@Component
public class Brand implements Condition {

    String brand;

    public Brand() {}

    public Brand(String brand) {
        this.brand = brand;
    }

    @Override
    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
        Environment environment = conditionContext.getEnvironment();
        environment.containsProperty("");
        return false;
    }
}
